//
//  main.m
//  FileWalkerPro
//
//  Created by quentin on 15/8/26.
//  Copyright (c) 2015年 QuentinLabs. All rights reserved.
//

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // insert code here...
        // NSLog(@"Hello, World!");
        NSFileManager* manager;
        manager = [NSFileManager defaultManager];
        
        NSString* home;
        home = [@"~" stringByExpandingTildeInPath];
        
        NSMutableArray* files;
        files = [NSMutableArray arrayWithCapacity:42];
        
        for (NSString* filename in [manager enumeratorAtPath:home]) {
            if ([[filename pathExtension] isEqualTo:@"jpg"]) {
                [files addObject:filename];
            }
        }
        
        for (NSString* filename in files) {
            NSLog(@"%@",filename);
        }
    }
    return 0;
}
